package DBase.Players;

import DBase.Board;
import DBase.Coordinate;

/**
 * 
 * @author Elya & Dana
 */
public class HumanPlayer extends Player{
        
     /**
     * Un mark a mark on rivals board
     * @param boardNum the board number to un mark
     * @param square the coordinate to un mark
     * @return
     */
    public boolean setUnMarkOnRivalBoard(int boardNum,Coordinate square){
        
        boolean ans=false;
        Board rivalBoard=rivalBoards[boardNum];
        if(rivalBoard.GetGameBoard()[square.getRow()][square.getColumn()].getMark().compareTo("o")==0){
        rivalBoard.GetGameBoard()[square.getRow()][square.getColumn()].setMark(" ");
        ans=true;
        }
        return ans;
    }
    
     /**
     * Mark a mark on rivals board
     * @param boardNum the board number to mark
     * @param square the coordinate to mark
     * @return
     */
    public boolean setMarkOnRivalBoard(int boardNum,Coordinate square){
    
        boolean ans=false;
        Board rivalBoard=rivalBoards[boardNum];
        if(rivalBoard.GetGameBoard()[square.getRow()][square.getColumn()].getMark().compareTo(" ")==0){
            rivalBoard.GetGameBoard()[square.getRow()][square.getColumn()].setMark("o");
             ans=true;
        }
        return ans;
    }
}
